package com.atguigu.upp.mapper;

import com.atguigu.upp.bean.TagInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Smexy on 2022/11/30
 */
public interface TagInfoMapper
{
    //根据taskId查询 tagInfo
    @Select("select * from tag_info where tag_task_id = #{id}")
    TagInfo getTagInfoByTaskId(@Param("id") Long taskId);

    @Select("SELECT * FROM  tag_info WHERE `tag_task_id` IN " +
        "(SELECT id FROM `task_info` WHERE `task_status`='1')")
    List<TagInfo> getTagInfoExecute();
}
